home *** CD-ROM | disk | FTP | other *** search
/ Champak 40 / Vol 40.iso / games / water_ba.swf / scripts / frame_14 / DoAction.as
Encoding:
Text File  |  2007-03-21  |  4.1 KB  |  157 lines

  1. function menu()
  2. {
  3. }
  4. stop();
  5. _root.currentlevel = 1;
  6. _root.charchoice = "girl";
  7. _root.intense = 4;
  8. _root.addscore = 40;
  9. _root.intensity = [11000,19000,8700,8200,7200,5200,5000,4100,4050,4040,3030,2020,2010,2000,1050,1025,1000,900,900,900,950,950,900];
  10. _root.throwintense = [25,40,40,40,40,40,40,40,30,30,30,30,30,30,30,30,30,30,30,30,30];
  11. _root.throwlock = _root.throwintense[4];
  12. _root.critterhit = 0;
  13. _root.hopperin = 30000;
  14. _root.intensecounter = 4;
  15. _root.postname = "Kiko";
  16. _root.score = 0;
  17. demo.removeMovieClip();
  18. register_b.removeMovieClip();
  19. register_name.removeMovieClip();
  20. register_key.removeMovieClip();
  21. _root.btext.removeMovieClip();
  22. delete bubblenote.prototype.onEnterFrame;
  23. delete _root.flipper.onEnterFrame;
  24. delete _root.bballoon.onEnterFrame;
  25. delete _root.btext.onEnterFrame;
  26. _root.bballoon.removeMovieClip;
  27. _root.attachMovie("grassback2","grass",2);
  28. _root.base.removeMovieClip();
  29. _root.powerupnum = 0;
  30. menu.currentup = false;
  31. pupint.clearInterval();
  32. if(_root.currentlevel >= 1 and _root.startedgame == true)
  33. {
  34.    _root.frame.removeMovieClip();
  35.    gotoAndStop(20);
  36. }
  37. else
  38. {
  39.    _root.laughz.singleshot("laughz",true);
  40.    _root.prevscore = 0;
  41. }
  42. menu.prototype = new MovieClip();
  43. Object.registerClass("button_plain",menu);
  44. xsetting = 220;
  45. if(_root.registergame)
  46. {
  47.    ysetting = 190;
  48.    textarray = ["text_rule","text_setup2","text_playdemo1","text_scores","text_buygame1"];
  49. }
  50. else
  51. {
  52.    ysetting = 190;
  53.    textarray = ["text_rule","text_setup2","text_playdemo1","text_scores","text_buygame1"];
  54. }
  55. xarray = [-200,800,-200,800,-200,-220,800,-200,800,-200,800,-200];
  56. xsetting = xarray[0];
  57. menuitem = 0;
  58. while(menuitem < 10)
  59. {
  60.    Object.registerClass(textarray[menuitem],menu);
  61.    attachMovie(textarray[menuitem],["button" + menuitem],menuitem + 5,{_x:256,_y:600,timer:menuitem,originy:ysetting,_xscale:99,_yscale:99});
  62.    ysetting += 25;
  63.    menuitem++;
  64. }
  65. menu.prototype.onEnterFrame = function()
  66. {
  67.    if(_root._currentframe < 14)
  68.    {
  69.       this.removeMovieClip();
  70.    }
  71.    if(_root._currentframe > 15)
  72.    {
  73.       this.removeMovieClip();
  74.    }
  75.    if(this.locked)
  76.    {
  77.       this.enabled = false;
  78.    }
  79.    else
  80.    {
  81.       this.enabled = true;
  82.    }
  83.    if(!this.init)
  84.    {
  85.       this.hh = 0;
  86.       this.cevent = 1;
  87.       this.init = true;
  88.    }
  89.    this.onRollOver = function()
  90.    {
  91.       _root.cursorz.gotoAndStop(3);
  92.       rollover1.singleshot("rollover1",true);
  93.       this._y = this.originy - 5;
  94.    };
  95.    this.onRollOut = function()
  96.    {
  97.       _root.cursorz.gotoAndStop(1);
  98.    };
  99.    this.onPress = function()
  100.    {
  101.       down.singleshot("down",true);
  102.       this._y = this.originy - 7;
  103.    };
  104.    this.onRelease = function()
  105.    {
  106.       _root.cursorz.gotoAndStop(1);
  107.       _root.menu.prototype.locked = true;
  108.       if(!menu.currentup)
  109.       {
  110.          switch(this.timer)
  111.          {
  112.             case 0:
  113.                _root.attachMovie("board_rules","boardrules",1000,{_x:256,_y:218,name:"menu"});
  114.                menu.currentup = true;
  115.                break;
  116.             case 1:
  117.                _root.attachMovie("char_setup","boardsetup",1000,{_x:256,_y:218,name:"menu",locked:true});
  118.                menu.currentup = true;
  119.                break;
  120.             case 2:
  121.                _root.frame.removeMovieClip();
  122.                _root.uiobj = _root.myLocalSO.data.uiobj;
  123.                trace(_root.uiobj);
  124.                _root.gotoAndStop("levelsetup");
  125.                break;
  126.             case 3:
  127.                _root.attachMovie("board_score","boardcontrol",999,{_x:256,_y:218,name:"menu"});
  128.                menu.currentup = true;
  129.                break;
  130.             case 4:
  131.                gotoAndStop(33);
  132.                cool.singleshot("crow",true);
  133.                menu.currentup = false;
  134.                _root.menu.prototype.locked = false;
  135.          }
  136.       }
  137.    };
  138.    if(this._y != this.originy)
  139.    {
  140.       this.snapinplace(0.8,1.7,this.originy,256);
  141.    }
  142.    if(this.i > this.timer * 80)
  143.    {
  144.       this.snapinplace(0.8,1.7,this._y,256);
  145.    }
  146.    else if(this.i < 500)
  147.    {
  148.       this.i = this.i + 1;
  149.    }
  150. };
  151. i = 0;
  152. while(i < 10000)
  153. {
  154.    clearInterval(i);
  155.    i++;
  156. }
  157.